import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { TransformResponseInterceptor } from './transform-response/transform-response.interceptor';
import { ValidationPipe } from '@nestjs/common';
import { NestExpressApplication } from '@nestjs/platform-express';
const transformResponseInterceptor = new TransformResponseInterceptor()
async function bootstrap() {
  const app = await NestFactory.create<NestExpressApplication>(AppModule);
  app.useGlobalInterceptors(transformResponseInterceptor)
  app.useGlobalPipes(new ValidationPipe())
  app.useStaticAssets('public')
  await app.listen(process.env.PORT ?? 3000);
}
bootstrap();
